﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace Mes.Infrastructure.Data.BoundedContext.Common
{
    public static class StringExtensions
    {
        public static string ToSnakeCase(this string input)
        {
            if (string.IsNullOrEmpty(input)) { return input; }
            return Regex.Replace(input, @"([a-z0-9])([A-Z])", "$1$2").ToLower();
        }
    }
}
